SFXedit 0.93 beta documentation. ©2005
VL-Tone -- ant00@lycos.com |
This is a prerelease of an
upcoming Starfox level editor application. It contains some bugs and may corrupt your ROM file(s), so only use it on backups. I don’t provide the ROM file, and don’t ask me where to find them. I hope you are or were once a proud StarFox cartridge owner. It can -only- be used with version 1.0 of the Starfox ROM. Version 1.0 has a red contour over the title screen logo. Version 1.2 has a brown contour. Japanese version has a blue contour. I’ll add support for these other versions some day (including SFX Competition). New in SFXedit 0.93: the program will check for the correct StarFox US 1.0 version. If the version is not US 1.0, the program will tell you what version you were trying to open. Just click the open ROM file button again and chose the correct version. Now for an explanation of the level editor basics. Hexadecimal knowledge is required. There are 2 banks used for the level in the game at $000005 and $00000D. Most if not all hex adress used in the editor are in reverse byte order, and that may change in the future. The real ROM addresses of these can be found by multiplying the high byte by 32768 and then adding the remaining 16-bit chunk +512 The editor will edit an extra 32k bank at $000020 provided you extended the ROM by at least 32k (32768 bytes). The extra empty bank must be filled with FFs so to extend a SNES ROM, just add at least a 32768 bytes chunk of FFs. The editor will auto-detect if the ROM has been extended. I’ll add the possibility too access more extra banks soon. In the editor you can -Select multiple objects using the shift key. -Copy them and paste them in empty spaces. -Delete objects to free space. -Please note that empty spaces (FF) will crash the game if it reads them. -That’s why I suggest you work in the extra bank instead of trying to modify the original levels too much. -The “Open ROM” button is used to open a ROM. -The “Run in SNES9x” should open the ROM in your Emulator. -This run function may or may not work :) -The revert file location is only asked if it’s needed (when you revert an object) -The revert file location is reseted when you open a save/edit ROM. -”Revert Selection” only works on objects that have the same type in the revert ROM. -Click on a location in the blue list to jump to other levels, default is Training. -You can edit any property of any object that has it’s value hi-lighted by clicking on it. You can even edit the br1, br2, br3 and b4 properties of h78 asm objects without having to edit the code. -Very important feature: if you click on an editable property name, many properties will display a pop-up menu, where you can chose pre-defined values with descriptions, very useful for objnum:, objtyp: , objid: and bhnum:. -If you click on “warp:” or “br1:” property though. the editor will jump to the warp address. Use the Go Back button to get back to where you where. -When “duplicate at:” is selected, the duplicate button will duplicate objects starting at the next empty space found after the address (default is “000020” the start of the empty extra bank) -If the next empty location is too far or there is not enough space there, the editor will spit out an error. -Most levels are initialized in the 0D bank but jump back in the 05 bank, you can use this warp object to jump to a new level at the 20 bank for example. -To create new objects, you can choose them by clicking the popup menu field at the right of the “new object” button, then click the button. -To paste and create objects, you must select an empty byte object that is followed by enough empty bytes objects to fit the object length. -When you click on the animated icon for an object it will open it in the 3d viewer on top. -You can rotate objects in the 3d viewer by dragging in the 3d view, holding alt will rotate on another axis. -You can use the “.” and “,” keys to step frames of an object when the animation is stopped. -When you click on the asm property of an h78 chunk, you get a disassembled version of the included asm code in the red upper right text field. -You can set initial conditions for the register emulation bits, most h78 chunk don’t require a change from the default. (this only affects disassembling) -If you click the Hex Data Mode button, you’ll get an hexdata: property field for objects instead of the individual properties. -The hexdata: property fields contains raw hex bytes not including the first byte which is the “objtyp:” byte. -You can copy and paste values when they are selected. You can even copy some uneditable properties like “addr:” to a “warp:” property. -Click on “Normal Mode” to get the normal view of properties. The ztimer value is a decrementing counter that is very important to the game engine. Until this counter reach zero, the games moves forward without drawing and loading anything new. When the value reaches zero, the next object is loaded and displayed if it’s a polygon object. The game will then load and draw any following objects at a position relative to the current one, until it reaches a new ztimer setting. The h8A and h12 objects are used to set the ztimer, but most objects with x y z coords also can set the ztimer. It’s used to make gaps in game, it makes the x y z coord system always relative to the last ztimer setting. |
The object viewer
is new in version 0.93. |
Here are descriptions for all chunk types used in the game.
h86 len: 14 Object+behavior with 16 bits coords |
This is one of the common
way to display 3d polygonal objects in the game.16-bits x y and z coordinates
are used (-32768 to +32768) |
h00 len: 11 Object+behavior with 16 bits coords |
This one also uses 16 bits
coordinates. |
h74 len: 10 Object/behavior with 16 bits coords |
This chunk type also uses
16 bits coords . You can see this value in the non editable objnum: text field. |
h70 len: 7 Object+behavior with 8 bits coords |
This chunk type is like
h00 but with 8 bits coordinates. |
h76 len: 6 Object/behavior with 8 bits coords |
This chunk type is like
h86 but with 8 bits coordinates. |
h0A len: 16 Random group behavior with 16 bits coords |
This chunk type has 16
bits x, y and z coordinates. It's used to generate asteroid
fields and other randomized swarms. |
All the previously described
polygon objects chunk types include
a ztimer: property, which is defined earlier in the document.
h78: len:varies. Pure ASM code block. |
This chunk type will execute
imbeded SNES code and then go back to the game. |
h2C len: 6 Warp to 2 bytes address in current bank. |
This chunk type is used to warp to a 2 bytes address in the current bank, but only when a predefined condition is met. The condition: property is 3 bytes long and refers to a specific address where the condition is checked. You can use the included pop-up menu to access all the values that are used in the game. For example it's used in
the Spaceship Armada level to decide if the arwing will enter inside
a ship or pass beside it. |
h5E len: 6 Screen transition |
Transitions and other unknown events. Use the pop-up menu to get
a list of values used in the game. |
h04 len: 5 Loop segment x times |
Used in the game loop to any address in the current bank using 2 bytes ie: XXXX05, XXXX0D or XXXX20. The loop will occur X number of times then the game will continue with the next object. Note that when moving/duplicating
parts of levels you have to manually change the destination address
for h04 loops, and other warps like h2E and h28, and h78 brx: warp properties. |
h36 len: 4 Rotates previous polygon object |
Will rotate the last displayed
polygon object according to a one byte rotation mode and 2 bytes angle
or rotation speed value. |
h2E len: 4 Warp to 3 bytes address |
h28 len: 4 Warp to 3 bytes address, add to stack |
These chunk objects will
warp to anywhere in the ROM Just use a h2A object at
the end of your level data so that the game ends the level normally. |
h10 len: 3 Setup Level BG, Music etc. |
Basic initialization of
the level, changes the background graphics, |
h8C len: 3 Behavior for previous object (16-bits) |
This chunk type attaches
to the last showed polygonal objects and There are different sets
of these and many are character specific |
h8A len: 2 Set ztimer with 8 bit value |
h12 len: 3 Set ztimer with 16 bit value |
Sets the ztimer to a 8
bit or 16 bit value. |
h64 len: 2 Init camera? |
It's found only at the
start of level and seems to reset the camera. |
h76 len: 6 Object/behavior with 8 bits coords |
This chunk type is like
h86 but with 8 bits coordinates. |
h14 len: 2 Changes Music |
To change the music anywhere
in a level. Value "F0" fades out. |
h2A len: 1 Jump back from warp |
As described in the h28
explanation, will make the game jump back to just after the last h28
was called. |
h5A len: 1 Palette set change? |
I'm not too sure about this one but it seems to override the palette set for the previous object. |
h02 len: 1 Fades music out then loops empty level |
Used at the end of some
levels? |
h0E len: 1 Shows current stage number |
Displays "STAGE: X" |
h44 len: 1 Fades to black |
Fades the screen to black. |
h84 len: 1 Palette set change? |
Not sure about this one
yet. |
h4E len: 1 Unknown use. |
This chunk type is one
byte and I don't know its use yet. |